package com.frank.oj.service.oj;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.frank.model.entity.training.TrainingCategory;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.RegisterTrainingDTO;
import com.frank.oj.model.vo.AccessVO;
import com.frank.oj.model.vo.ProblemVO;
import com.frank.oj.model.vo.TrainingRankVO;
import com.frank.oj.model.vo.TrainingVO;

import java.util.List;

/**
 * @author frank
 * @Date 2024/3/23
 */
public interface TrainingService {
    CommonResult<IPage<TrainingVO>> getTrainingList(Integer limit, Integer currentPage, String keyword, Long categoryId, String auth);

    CommonResult<List<TrainingCategory>> getTrainingCategory();

    CommonResult<TrainingVO> getTrainingDetail(Long tid);

    CommonResult<List<ProblemVO>> getTrainingProblemList(Long tid);

    CommonResult<AccessVO> getTrainingAccess(Long tid);

    CommonResult<Void> toRegisterTraining(RegisterTrainingDTO registerTrainingDto);

    CommonResult<IPage<TrainingRankVO>> getTrainingRank(Long tid, Integer limit, Integer currentPage, String keyword);
}
